/**
* @class The base exception to all exceptions thrown by code in Kusog.
* @Depends ksg.base.js

* @param {String} id The unique identifier for the given type of exception.  
* This should be usable as an id for articles written about the given type of error.
* @param {String} location A source code location that helps to identifer where the given error
* happened.
* @param {Map} vals A map of values that will be used as information about the error
* and can be embedded into an article about the error when displayed to the user.
*/
ksg.BaseException = function(id, location, vals) {
	this.id = id;
	this.location = location;
	this.vals = vals;
}
ksg.BaseException.prototype = {
	/**
	* A rudamentary method to generate a single line of text that could be displayed
	* to a user about the exception.  This isnt a very classy way to display an error, but is useful
	* in the begining of development.
	* @returns {String} A string with the various information about the error embedded in.
	*/
	displayText: function() {
		var txt = this.location + " - " + this.id + ": ";
		for(var i in this.vals)
			txt += this.vals[i] + ", ";
		return txt;
	}
};
